package com.xinhua.entity;

import java.sql.Clob;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="t_surveydetail")
public class SurveyDetail {
	private Integer id;
	private Date date;
	private Integer score;
	private String advise;
	
	private SurveyContent content;
	private Teacher teacher;
	private Major major;
	private Courses course;
	private SurveyItem item;
	private Period pd;
	
	private String ip;
	
	public SurveyDetail() {
		// TODO Auto-generated constructor stub
	}
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@ManyToOne
	@JoinColumn(name="period_id")
	@JsonIgnore
	public Period getPd() {
		return pd;
	}

	public void setPd(Period pd) {
		this.pd = pd;
	}

	@OneToOne
	@JoinColumn(name="surveyitem_id")
	public SurveyItem getItem() {
		return item;
	}
	public void setItem(SurveyItem item) {
		this.item = item;
	}
	
	@OneToOne
	@JoinColumn(name="surveycontent_id")
	public SurveyContent getContent() {
		return content;
	}
	public void setContent(SurveyContent content) {
		this.content = content;
	}
	
	@OneToOne
	@JoinColumn(name="teacher_id")
	public Teacher getTeacher() {
		return teacher;
	}
	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}
	
	@OneToOne
	@JoinColumn(name="major_id")
	public Major getMajor() {
		return major;
	}
	public void setMajor(Major major) {
		this.major = major;
	}
	
	@OneToOne
	@JoinColumn(name="course_id")
	public Courses getCourse() {
		return course;
	}
	public void setCourse(Courses course) {
		this.course = course;
	}

	public Integer getScore() {
		return score;
	}
	public void setScore(Integer score) {
		this.score = score;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getAdvise() {
		return advise;
	}

	public void setAdvise(String advise) {
		this.advise = advise;
	}
	
}
